[FLINK-27773][Web Dashboard] Top N Metrics Dashboard#27774
Open
featzhang wants to merge 1 commit intoapache:masterfrom
Open
[FLINK-27773][Web Dashboard] Top N Metrics Dashboard#27774featzhang wants to merge 1 commit intoapache:masterfrom
featzhang wants to merge 1 commit intoapache:masterfrom
Conversation
2c037cf to
c61453b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR fixes fundamental architectural issues in the Top N Metrics Dashboard implementation that were identified during CI analysis. The previous implementation had critical design flaws that prevented it from working correctly.
Changes
AbstractRestHandlerinstead of using incorrect base classRuntimeMessageHeaderswith correct method signatures (getRequestClass, getResponseClass, getResponseStatusCode, getHttpMethod)metricStore.getRepresentativeAttempts()to get job taskstaskMetricStore.getAllSubtaskMetricStores()to get subtasksHttpMethodWrapperinstead of non-existentHttpMethodLoggerinstance for better error trackingTopNMetricsHandlerinWebMonitorEndpointlegacy.messagesto properjob.metricspackageImplementation Details
The implementation now follows Flink's standard REST API architecture pattern:
AbstractRestHandler<RestfulGateway, EmptyRequestBody, TopNMetricsResponseBody, TopNMetricsMessageParameters>MetricFetcherintegrationVerifying this change
Documentation
This adds a new REST endpoint:
GET /jobs/:jobid/metrics/top-nthat returns Top N metrics for a job.Notes
The previous PR #27771 was closed due to fundamental architectural issues. This implementation addresses all identified issues and follows Flink's standard patterns.